package com.cn.ycy.dao;


import com.cn.ycy.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Mapper接口
 *
 * @author anyone
 * @since 2020-12-10
 */
//@Mapper
@Repository
public interface UserMapper {

  /**
   * 新增
   */
  public int insert(@Param("user") User user);

  /**
   * 删除
   */
  public int delete(@Param("id") int id);

  /**
   * 更新
   */
  public int update(@Param("user") User user);

  /**
   * Load查询
   */
  public User load(@Param("id") int id);

  /**
   * 分页查询Data
   */
  public List<User> pageList(@Param("offset") int offset,
                             @Param("pagesize") int pagesize);

  /**
   * 分页查询Count
   */
  int pageListCount();


}
